// Handle auth 权限指令
App.directive('edAuth', ['Auth', function (Auth) {
    return {
        restrict: 'A',
        compile : function(tElement, $tAttrs, linker) {

            $($('.page-content-wrapper > .page-content').find('[ed-auth]')).each(function(i, btn) {
                var btnCode = $(btn).attr("ed-auth");
                if (!Auth.validate(btnCode)) {
                    $(btn).hide();
                }
            });

        }
    };
}]);
